const { logs, deleteLog, addLogsMsg, seekLogsUser, seekLogsResult, seekLogsHandle, seekLogsTime } = require("../dao/logsDao")
// 渲染页面
module.exports.logs = async function (params) {
    const data = await logs(params);
    return {
        data,
        num: 1
    }
};
// 删除
module.exports.deleteLog = async function (msg) {
    const data = await deleteLog(msg);
    if (data) {
        return {
            message: '删除成功',
            status: 1,
            data
        }
    }
    return {
        message: '删除失败',
        status: 0,
        data
    }
}
// 新增
module.exports.addLogsMsg = async function (msg) {
    const data = await addLogsMsg(msg);
    return data;
}
// 搜索：seekLogsUser,seekLogsResult,seekLogsHandle,seekLogsTime
module.exports.seekLogsUser = async function (variable) {
    const data = await seekLogsUser(variable);
    return {
        data,
        status: 1,
        num: 2,
    };
}
module.exports.seekLogsResult = async function (variable) {
    const data = await seekLogsResult(variable);
    return {
        data,
        status: 1,
        num: 3
    };
}
module.exports.seekLogsHandle = async function (variable) {
    const data = await seekLogsHandle(variable);
    return {
        data,
        status: 1,
        num: 4
    };
}
module.exports.seekLogsTime = async function (variable) {
    const data = await seekLogsTime(variable);
    return {
        data,
        status: 1,
        num: 5
    };
}